const Crawler = require("crawler");

const c = new Crawler({
  maxConnections: 10,
  // preRequest(options, done) {
  //   // options.jar = true;
  //   done();
  // },
  // This will be called for each crawled page
  callback: (error, res, done) => {
    if (error) {
      console.log(error);
    } else {
      const $ = res.$;
      // $ is Cheerio by default
      //a lean implementation of core jQuery designed specifically for the server
      console.log(res.body);
    }
    done();
  },
});
c.queue({
  uri: "https://www.zhipin.com/wapi/zpgeek/mobile/search/joblist.json?city=101180100&querySource=1&page=2&city=&query=",
  jQuery: false,
});
